﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace DomenModel
{
    public class Role : IComparable
    {
        [Key]
        public int RoleId { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public IList<User> Users { get; set; }

         int IComparable.CompareTo(object obj) 
         {  
             Role temp = (Role)obj;  
             if(this.RoleId > temp.RoleId) return 1;  
             if(this.RoleId < temp.RoleId) return -1;  
             else return 0; 
         }


    }
}
